Vortex by Kevin Bagley - Notes

I found this old disk while imaging floppies.  Apparently a friend of mine had a nibble copy of it at the time, and we had spent some time fiddling with it to deprotect it.  It was among the first handful of things I cracked I think.  But, since it was still early days in learning about that stuff it looks like we left it in full disk form, even though the game itself is a single-load affair.

When I converted the floppy to a .dsk image, I found that it didn't work in AppleWin.  A quick check revealed that indeed, the original disk used a volume number of 17 (11h).  Converting the .dsk to a .2mg and setting the volume number to 17 allowed it to work in AppleWin though.

But that got me started down the path of looking a bit more into it, and I got the idea of seeing if I could make a single load game from it.  I figured that would be as good excuse as any to resurrect at least some of what I've forgotten.

The game disk has DOS 3.3 on it, and a few files: a BASIC Vortex file, which is the boot file for the disk, and a couple binaries, Double Up and Newsound.  (Scanning the disk with a sector editor will reveal a deleted file Switchexact too; this code is on the disk in a few places and is loaded via other means as will be noted.)  The first catalog sector is on track 5, sector 0 instead of track $11 (part of the original protection I think).  I'd guess the rest of the original protection was just modified address markers or such.  There does appear to be one sector on the disk with a fragment of source code.

The Vortex file loads Newsound (which is the sound effects routines), then loads the Double Up and calls it.  Double Up is a routine that sets up an IOB and calls into the DOS RWTS routine via $3D9 to read in the last few tracks on the disk.  These read into $1FFA-$3FF9, $3FFA-$5FF9, $5FFA-$7FF9, and $7FFA-$9FF9 via four separate calls to RWTS.

Now, two of those are full pictures (the title pic is at $2000 and the game pic is at $6000).  The 'switch' routine is at $8000, and swaps these two images in/out to hi-res page1 ($2000).  This switch routine is the deleted Switchexact file, but is now loaded via the RWTS call instead of a file for some reason.

Other than the basic program, the main game code is at $4000.  The game only uses graphics page 1, and has no page-flipping graphics (this game was from 1981-1982 I think).

I'm aware that file versions of this already exist, but I got to thinking that two full pictures and the small bits of game code could be packed and loaded more efficiently, creating an overall much smaller file-based version.  So I rooted around until I found a picture packer/unpacker I used to use and set off on grabbing and putting all the pieces together. Since the object code would now be in a single file, I had to modify the basic program to only load and call that before continuing execution, otherwise it's as found.

The result is two files, totaling 52 sectors.  In theory, it should be possible to combine them into one file, but that's more work than I care to research and remember for now...

Anyway, it was a fun diversion, so thought I'd share.  Notes on the bits and pieces that went into the file version are below.  I've placed images of both the full disk and the file version on Asimov Incoming.

Hot Rod
July 2012 


Notes:

Newsound: $300, L$96
Switch: $8000, L$74
Game: $4000, L$166F
title pic packed: $2000; L$8F8
game pic packed: $6000; L$573

1FFA:	20 80 41
	4C 20 49

move Newsound to $300
move Switch to $8000
unpack title pic to $2000
unpack game pic to $6000

Vortex.obj:
1E7D:jump to setup
1E80-1EFB:unpack routine
1F00-1F5F:setup
	move newsound and switch combined (extra bytes get moved on switch)
	unpak game pic to $6000
	move game and title pic to $4000
	unpak title pic to $2000
	setup screens
	return
1F60-1FF5:newsound
1FFA-1FFF:game frag
2000-366F:game
3670-36E4:switch
3700-3FF7:title pic pak
4000-4572:game pic pak
